<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>

<html style="height:100%;">
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<jsp:include page="/core/tool/resources.jsp"></jsp:include>
	<script src="./synch.js"></script>
	
</head>

<body style="height:100%;margin:0">

<div style="min-height:500px;height:100%;"> 
<div class="easyui-layout" data-options="fit:true">

<div data-options="region:'north',split:true" style="width:auto;height:250px">
<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'north'"  style="width:auto;padding:3px;padding-bottom:5px">
	    <a class="easyui-linkbutton" iconCls="icon-remove" onclick="click_delete()">删除</a>
	    <a class="easyui-linkbutton" iconCls="icon-reload" onclick="click_refresh()">刷新</a>
	              开始时间:<input id="startDate" class="easyui-datebox"/>
	    <a class="easyui-linkbutton" iconCls="icon-reload" onclick="click_synchnize()">同步</a>
	</div>
	
	<div data-options="region:'west',split:true" style="width:49%">
      	<form id="ff1"  class="easyui-flexform" data-options="cellWidth:150,cellMargin:3,labelWidth:0,labelAlign:'right'">
			<div>
				<label>净值:</label>
				<div><input class="easyui-numberbox" name="netAssert" data-options="width:120"/></div>
		 	</div>
			<div>
				<label>市值:</label>
				<div><input class="easyui-numberbox" name="marketValue" data-options="width:120"/></div>
		 	</div>
			<div>
				<label>现金:</label>
				<div><input class="easyui-numberbox" name="cash" data-options="width:120"/></div>
		 	</div>
		</form> 
		<table id="dg1" class="easyui-edatagrid"
				data-options="toolbar:'#ff1',singleSelect:true,rownumbers:true, fit:true,
					 	sortOrder:'acs', sortName:'secId', title:'本系统持仓', editing:false, remoteSort:false">
	        <thead>
	            <tr>
	           	 	<th data-options="field:'secId',width:100, sortable:true">代码</th>
	           	 	<th data-options="field:'secName',width:100">名称</th>
	           	 	<th data-options="field:'secNum',width:100, align:'right', editor:'numberbox', sortable:true">数量</th>
	            </tr>
	        </thead>
		</table>
	</div>
	<div data-options="region:'center',split:true" style="width:49%">
		<form id="ff2"  class="easyui-flexform" data-options="cellWidth:150,cellMargin:3,labelWidth:0,labelAlign:'right'">
			<div>
				<label>净值:</label>
				<div><input class="easyui-numberbox" name="netAssert" data-options="width:120"/></div>
		 	</div>
			<div>
				<label>市值:</label>
				<div><input class="easyui-numberbox" name="marketValue" data-options="width:120"/></div>
		 	</div>
			<div>
				<label>现金:</label>
				<div><input class="easyui-numberbox" name="cash" data-options="width:120"/></div>
		 	</div>
		</form> 
		<table id="dg2"  class="easyui-edatagrid"
				data-options="toolbar:'#ff2',singleSelect:true,rownumbers:true, fit:true,
					 	sortOrder:'acs', sortName:'secId', title:'外部系统持仓', editing:true, remoteSort:false">
		       <thead>
	            <tr>
	           	 	<th data-options="field:'secId',width:100, sortable:true">代码</th>
	           	 	<th data-options="field:'secName',width:100">名称</th>
	           	 	<th data-options="field:'secNum',width:100, align:'right', editor:'numberbox', sortable:true">数量</th>
	            </tr>
	        </thead>
		</table>
	</div>
</div>
</div>

	<div data-options="region:'center',split:true">
		<table id="dg3" data-options=" rownumbers:true,singleSelect:false,pagination:true,idField:'billId',
	            	sortOrder:'desc', sortName:'billTime',editing:false, pageSize:20, fit:true
	            ">
	        <thead>
	            <tr>
	            	<th data-options="field:'checked'" checkbox='true'>主键</th>
	           	 	<th data-options="field:'billId'" hidden='true'>主键</th>
	           	 	<th data-options="field:'acountId'" hidden='true'>主键</th>
	           	 	<th data-options="field:'billTime',width:130,order:'desc',editor:'datetimebox'" sortable="true">交易时间</th>
	           	 	<th data-options="field:'exId',width:80">外部ID</th>
	                <th data-options="field:'billType',width:80, formconfig:{type:'combobox',options:{flexset:'TRADE_TYPE'}}">类别</th>
	                <th data-options="field:'secId',width:80">代码</th>
	                <th data-options="field:'secName',width:90,formatter:secNameFormatter">名称</th>
	                <th data-options="field:'billMoney',width:80,align:'right',sortable:true, editor:{type:'numberbox',options:{precision:2}}">交易金额</th>
	                <th data-options="field:'billTradeMoney',width:80,align:'right',sortable:true, editor:{type:'numberbox',options:{precision:2}}">交易净额</th>
	                <th data-options="field:'secNum',width:80,align:'right',editor:'numberbox',styler:profitStyle">数量</th>
	                <th data-options="field:'secPrice',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">价格</th>
	                <th data-options="field:'bondInterest',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">利息</th>
	                <th data-options="field:'feeCommision',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">佣金</th>
	                <th data-options="field:'feeTax',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">印花</th>
	                <th data-options="field:'feeOther',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">其它</th>
	                <th data-options="field:'feeAll',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">费用合计</th>
	                <th data-options="field:'billDesc',width:300">说明</th>
	            </tr>
	        </thead>
	    </table>
	</div>

</div>
</div>

</body>
</html>
